using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using thinger.ToolsLib;

namespace thinger.ControlDemo
{
    public partial class FrmStringSecurityHelper : Form
    {
        public FrmStringSecurityHelper()
        {
            InitializeComponent();
        }

        private void btn_SHA_Click(object sender, EventArgs e)
        {
            this.txt_ResultSHA1.Text = StringSecurityHelper.SHA1Encrypt(this.txt_InputSHA1.Text);
        }

        private void btn_MD5_Click(object sender, EventArgs e)
        {
            this.txt_ResultMD5.Text = StringSecurityHelper.MD5Encrypt(this.txt_InputMD5.Text);
        }

        private void btn_DESEncrypt_Click(object sender, EventArgs e)
        {
            this.txt_DESEncrypt.Text = StringSecurityHelper.DESEncrypt(this.txt_InputDES.Text);
        }

        private void btn_DESDecrypt_Click(object sender, EventArgs e)
        {
            this.txt_DESDecrypt.Text = StringSecurityHelper.DESDecrypt(this.txt_DESEncrypt.Text);
        }
    }
}
